#!/usr/bin/python3
# -*- coding: utf-8 -*-

# @file service.py
# @brief
# @author QRS
# @version 1.0
# @date 2022-02-21 12:08


from frepai.core.message import MessageType as MT
from frepai.core.message import ServiceType as ST
from frepai.core.message import EventType as ET
from frepai.core.handlers.public import MainPublicHandler


class TaskServiceHandler(MainPublicHandler):
    def __init__(self):
        super(TaskServiceHandler, self).__init__(keys=[MT.SERVICE])

    def handle_message(self, what, arg1, arg2, obj):
        self.logger.info(f'{what}, {arg1}, {arg2}, {obj}')
        if arg2 == ET.E_PROGRESS:
            pass
        elif arg2 == ET.E_RESULT:
            pass
        # super().handle_message(what, arg1, arg2, obj)
        return True
